using UnityEngine;
using System.Collections;

[System.Serializable]
public class AdjustBrightnessByScroll : MonoBehaviour {
	
	public Light light;
	
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		if (Input.GetAxis("Mouse ScrollWheel") > 0 && light.intensity < 100 && light.range < 150) {
			light.intensity += 0.2f;	
			light.range += 1.3f;
		} else if (Input.GetAxis("Mouse ScrollWheel") < 0) {
			light.intensity -= 0.2f;	
			light.range -= 1.3f;
		}
	}
}
